//
//  LSConversationDetailSectionHeaderView.m
//  LookScore
//
//  Created by wws on 2018/3/30.
//  Copyright © 2018年 ChongQingXunTiCompany. All rights reserved.
//

#import "LSConversationDetailSectionHeaderView.h"

@implementation LSConversationDetailSectionHeaderView{
    
    UILabel * _allCommentNumLabel;
    
    UIButton * _btn;
}

- (instancetype)initWithFrame:(CGRect)frame{
    
    if (self = [super initWithFrame:frame]) {
        [self addContentView];
        
    }
    return self;
}


- (void)addContentView{
    UILabel * jcplLabel = [[UILabel alloc] init];
    jcplLabel.textColor = LSTitleGrayColor1;
    jcplLabel.font = LSFontSize14;
    jcplLabel.text = @"精彩评论";
    [self addSubview:jcplLabel];
    jcplLabel.sd_layout
    .leftSpaceToView(self, 10)
    .centerYEqualToView(self)
    .autoHeightRatio(0);
    [jcplLabel setSingleLineAutoResizeWithMaxWidth:180];
    
    _allCommentNumLabel = [[UILabel alloc] init];
    _allCommentNumLabel.textColor = LSTitleGrayColor3;
    _allCommentNumLabel.font = LSFontSize10;
    [self addSubview:_allCommentNumLabel];
    _allCommentNumLabel.sd_layout
    .leftSpaceToView(jcplLabel, 5)
    .centerYEqualToView(jcplLabel)
    .autoHeightRatio(0);
    [jcplLabel setSingleLineAutoResizeWithMaxWidth:180];
    
//    UIButton * btn = [UIButton buttonWithType:UIButtonTypeCustom];
//    btn.titleLabel.font = LSFontSize10;
//    btn.layer.borderWidth = 1.0;
//    btn.layer.cornerRadius = 5.0;
//    btn.layer.masksToBounds = YES;
//    btn.layer.borderColor = LSTitleGrayColor3.CGColor;
//    [btn setTitle:@"只看楼主" forState:UIControlStateNormal];
//    [btn setTitle:@"查看全部" forState:UIControlStateSelected];
//    [btn setTitleColor:LSTitleGrayColor3 forState:UIControlStateNormal];
//    [btn addTarget:self action:@selector(OnlyLookAtTheBuildingAction:) forControlEvents:UIControlEventTouchUpInside];
//    [self addSubview:btn];
//    _btn = btn;
//    btn.sd_layout
//    .rightSpaceToView(self, 10)
//    .heightIs(20)
//    .widthIs(50)
//    .centerYEqualToView(jcplLabel);
    
    UIView * lineView = [[UIView alloc] init];
    lineView.backgroundColor = LSLineGrayColor;
    [self addSubview:lineView];
    lineView.sd_layout
    .leftEqualToView(self)
    .rightEqualToView(self).bottomEqualToView(self)
    .heightIs(1);
    
    
}

- (void)setAllCommentStr:(NSString *)allCommentStr{
    _allCommentStr = allCommentStr;
    _allCommentNumLabel.text = allCommentStr;
    
    
}
//- (void)setIsBtnSelected:(NSInteger)isBtnSelected{
//
//    _isBtnSelected = isBtnSelected;
//    if (isBtnSelected == 1) {
//        _btn.selected = NO;
//    }else{
//
//        _btn.selected = YES;
//    }
//
//
//}
//
//- (void)OnlyLookAtTheBuildingAction:(UIButton * )sender{
//    if ([_delegate respondsToSelector:@selector(OnlyLookAtTheBuildingAction:)]) {
//        [_delegate OnlyLookAtTheBuildingAction:sender];
//    }
////    self.block(sender);
//    
//    
//}
@end
